/**
*      author: Y_Yao
*      created: 2024-11-16 20:08:52
**/

#include<bits/stdc++.h>

using namespace std;
#define int LL
using LL = long long;
const LL LLINF = 1e18;
const int INF = 0x3f3f3f3f;
string s;
const int N = 100 + 7;
int a[N];

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    cin >> s;
    int j = 0;
    for(int i = 0;i < s.size() - 1;i++)
    {
        if(s[i] == '|')
        {
            i++;
            int ant = 0;
            while(s[i] != '|')
            {
                i++;
                ant++;
            }
            a[j] = ant;
            j++;
            i--;
        }
    }

    for(int i = 0;i < j;i++)
    {
        cout << a[i] << " ";
    }
    return 0;
}